<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="1. 确保你的电脑已安装Git、npm 、node 此安装步骤仅限Windows用户（作者是穷逼，mac用户可移步至这里）   选择你博客将要创建的位置，新建文件夹。 在文件夹内右键选择’Git Bash Here’。 依次在打开的命令行中执行以下命令 123npm install -g hexo-clihexo init npm install  此时你的根目录下应该长这副模样:  到现在你就可">
<meta property="og:type" content="article">
<meta property="og:title" content="天才第一步">
<meta property="og:url" content="http://yoursite.com/2017/10/31/天才第一步/index.html">
<meta property="og:site_name" content="大高小郑的博客">
<meta property="og:description" content="1. 确保你的电脑已安装Git、npm 、node 此安装步骤仅限Windows用户（作者是穷逼，mac用户可移步至这里）   选择你博客将要创建的位置，新建文件夹。 在文件夹内右键选择’Git Bash Here’。 依次在打开的命令行中执行以下命令 123npm install -g hexo-clihexo init npm install  此时你的根目录下应该长这副模样:  到现在你就可">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://yoursite.com/images/1.png">
<meta property="og:image" content="http://yoursite.com/images/2.png">
<meta property="og:image" content="http://yoursite.com/images/3.png">
<meta property="og:image" content="http://yoursite.com/images/4.png">
<meta property="og:image" content="http://yoursite.com/images/5.png">
<meta property="og:image" content="http://yoursite.com/images/6.png">
<meta property="og:updated_time" content="2017-10-31T10:26:34.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="天才第一步">
<meta name="twitter:description" content="1. 确保你的电脑已安装Git、npm 、node 此安装步骤仅限Windows用户（作者是穷逼，mac用户可移步至这里）   选择你博客将要创建的位置，新建文件夹。 在文件夹内右键选择’Git Bash Here’。 依次在打开的命令行中执行以下命令 123npm install -g hexo-clihexo init npm install  此时你的根目录下应该长这副模样:  到现在你就可">
<meta name="twitter:image" content="http://yoursite.com/images/1.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.3',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/10/31/天才第一步/"/>





  <title>天才第一步 | 大高小郑的博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">大高小郑的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/10/31/天才第一步/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="MrGao">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="大高小郑的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">天才第一步</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-10-31T00:00:00+08:00">
                2017-10-31
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/业余/" itemprop="url" rel="index">
                    <span itemprop="name">业余</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="1-确保你的电脑已安装Git、npm-、node"><a href="#1-确保你的电脑已安装Git、npm-、node" class="headerlink" title="1. 确保你的电脑已安装Git、npm 、node"></a>1. 确保你的电脑已安装Git、npm 、node</h1><blockquote>
<p>此安装步骤仅限Windows用户（作者是穷逼，mac用户可移步至<a href="https://hexo.io/zh-cn/docs/index.html" target="_blank" rel="external">这里</a>）</p>
</blockquote>
<ol>
<li>选择你博客将要创建的位置，新建文件夹。</li>
<li>在文件夹内右键选择’Git Bash Here’。</li>
<li><p>依次在打开的命令行中执行以下命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">npm install -g hexo-cli</div><div class="line">hexo init </div><div class="line">npm install</div></pre></td></tr></table></figure>
</li>
<li><p>此时你的根目录下应该长这副模样:<br><img src="/images/1.png" alt="image"></p>
</li>
<li><p>到现在你就可以欣赏一下你的博客了，在命令行运行命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">hexo server</div></pre></td></tr></table></figure>
</li>
<li><p>在浏览器里访问’<a href="http://localhost:4000/&#39;即可。（至此你的博客已经在本地搭建完毕）" target="_blank" rel="external">http://localhost:4000/&#39;即可。（至此你的博客已经在本地搭建完毕）</a></p>
</li>
</ol>
<h1 id="2-小试牛刀"><a href="#2-小试牛刀" class="headerlink" title="2. 小试牛刀"></a>2. 小试牛刀</h1><ol>
<li>新建个文档玩玩。找到根目录/source/_posts，在这个文件夹里新建一个md文件’天才第一步.md’,然后开始编辑你的md文件。</li>
<li>刷新浏览器 :<br><img src="/images/2.png" alt="image"></li>
<li><p>会发现’ARTICLES RÉCENTS’下多了个’(no title)’，这就是那个’天才第一步.md’文件，但是显示no title 是不是很别扭，没关系，现在就来配置我们新建的文件。</p>
<blockquote>
<p>在文件最上方添加以’—‘分隔的区域，以下参数我不解释说明的就可不必去管，使用默认值就好</p>
</blockquote>
<p> 参数 | 描述<br> layout | 布局<br> title | 标题<br> date | 建立日期<br> update | 更新日期<br> comments | 开启文章的评论功能<br> tags | 标签<br> categories | 分类<br> permalink | 覆盖文章网址 </p>
 <figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">---</div><div class="line"> title : 天才第一步</div><div class="line"> date : 2017/10/31</div><div class="line"> comments : true</div><div class="line"> categories : 业余</div><div class="line">---</div></pre></td></tr></table></figure>
</li>
<li><p>配置完成，刷新浏览器<br><img src="/images/3.png" alt="image"></p>
</li>
<li>会发现即使我设置了’comments’属性为true，让别人也参与到对我文章的评论中来（多夸夸我），可是下面还是没有评论功能，这怎么行？</li>
<li>这个问题可能是由于Hexo默认主题的原因，没关系，换了它。</li>
</ol>
<h1 id="3-切换主题"><a href="#3-切换主题" class="headerlink" title="3. 切换主题"></a>3. 切换主题</h1><ol>
<li>搜索Hexo主题，一抓一大把，选一个你中意的，去github上下载即可。<br><img src="/images/4.png" alt="image"></li>
<li>将下载下来的解压之后的文件夹放入根目录/themes目录下</li>
<li>修改根目录下的’_config.yml’文件<br><img src="/images/5.png" alt="image"></li>
<li>打开命令行，ctrl+c停掉服务，hexo erver 重启服务，刷新浏览器。<br><img src="/images/6.png" alt="image"></li>
<li>主题切换成功</li>
</ol>
<h1 id="4-博客整体的配置"><a href="#4-博客整体的配置" class="headerlink" title="4.博客整体的配置"></a>4.博客整体的配置</h1><blockquote>
<p>根目录下的_config.yml文件，详情内容见<a href="https://hexo.io/zh-cn/docs/configuration.html" target="_blank" rel="external">这里</a></p>
<ol>
<li>title : 网站标题</li>
<li>subtitle : 网站子标题</li>
<li>description : 网站描述，搜索引擎</li>
<li>author : 作者大名</li>
<li>language : 网站语言</li>
<li>theme : 选用主题，从/themes/下选择 </li>
</ol>
</blockquote>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/10/31/hello-world/" rel="prev" title="Hello World">
                Hello World <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">MrGao</p>
              <p class="site-description motion-element" itemprop="description">web前端</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">3</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">1</span>
                  <span class="site-state-item-name">categories</span>
                
              </div>
            

            

          </nav>

          

          <div class="links-of-author motion-element">
            
          </div>

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#1-确保你的电脑已安装Git、npm-、node"><span class="nav-number">1.</span> <span class="nav-text">1. 确保你的电脑已安装Git、npm 、node</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#2-小试牛刀"><span class="nav-number">2.</span> <span class="nav-text">2. 小试牛刀</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#3-切换主题"><span class="nav-number">3.</span> <span class="nav-text">3. 切换主题</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#4-博客整体的配置"><span class="nav-number">4.</span> <span class="nav-text">4.博客整体的配置</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">MrGao</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.3</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  












  





  

  

  
  

  

  

  

</body>
</html>
